
	use "$datam/Section 24 Lancet", clear
	mmerge hhid idp_mother using "$data2010\R1_Section_24.dta"
	keep if _m==3 
	drop _m
	
	foreach var in ch_haz06 ch_waz06 ch_whz06 {
		replace r1_`var'=. if abs(r1_`var')>6 
		replace r2_`var'=. if abs(r2_`var')>6 
		}
			
	foreach i in s24_q9 ch_haz06 ch_waz06 ch_whz06 anemic anemic_severe stunted underweight wasting{
		replace r1_`i'=. if r2_`i'==.
		replace r2_`i'=. if r1_`i'==.
	}

	replace r1_stunted=. 		if r1_ch_haz06==.
	replace r2_stunted=. 		if r2_ch_haz06==.
	replace r1_underweight=. 	if r1_ch_waz06==.
	replace r2_underweight=. 	if r2_ch_waz06==.
	replace r1_wasting=. 		if r1_ch_whz06==.
	replace r2_wasting=. 		if r2_ch_whz06==.
	
	foreach i in s24_q9 ch_haz06 ch_waz06 ch_whz06 anemic anemic_severe stunted underweight wasting {

		ge diff_`i'=r2_`i'-r1_`i'
		replace diff_`i'=. if r1_`i'==. | r2_`i'==.
	}

	* add diarrhea *
		sort hhid idp_mother idp_child
		merge m:1 hhid idp_mother idp_child using "$data2010/R1_Section_17", keep(mas mat) nogen keepusing(s17_q4 s17_q2)
	
	save "$do/children", replace 
